﻿<!DOCTYPE>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	//获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	pageContext.setAttribute("basePath", basePath);
	pageContext.setAttribute("path", path);
%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="${basePath}css/style.css" />
<link rel="stylesheet" type="text/css"
	href="${basePath}css/external.min.css" />
<link rel="stylesheet" type="text/css" href="${basePath}css/popup.css" />
<script type="text/javascript" src="${basePath}js/jquery-3.2.1.js"></script>
<title>公司信息</title>
<meta content="description" name="description">
<meta content="keywords" name="keywords">

</head>
<body>
	<div id="body">
		<%@include file="header.jsp"%>
		
		<!-- end #header -->
		<div id="container">
			<!-- <script src="style/js/swfobject_modified.js" type="text/javascript"></script> -->
			<div class="clearfix">

				<div class="content_l">
					<div class="c_detail">
						

						<div class="c_box companyName">
							<h2 title="" id="name">公司名</h2>
							
							<div class="clear"></div>

							<h3 class="dn">公司福利</h3>
							<ul style="overflow: auto" id="hasLabels" class="reset clearfix">
								<li><span id="welfare">福利</span></li>
							</ul>
						</div>
						
						<div class="clear"></div>
					</div>

					<div id="Profile">
						<div class="profile_wrap">
							
							<dl class="c_section">
								<dt>
									<h2>
										<em></em>公司介绍
									</h2>
								</dt>
								<dd>
									<div class="c_intro" id="info">公司介绍</div>
									
								</dd>
							</dl>
						</div>

					</div>
					<!-- end #Profile -->

					<!--无招聘职位-->
					<dl id="noJobs" class="c_section">
						<dt>
							<h2>
								<em></em>招聘职位
							</h2>
						</dt>
						<dd>
							<div class="addnew">
								发布需要的人才信息，让伯乐和千里马尽快相遇……<br> <a href="${basePath}hr/position">+前往职位管理</a>
							</div>
						</dd>
					</dl>
					<a  href="${basePath}hr/updateCompany" class="btn_big fr" title="更新公司信息"/>更新公司信息</a>
				</div>
				<!-- end .content_l -->

				<div class="content_r">
					<div id="Tags">
						<div id="c_tags_show" class="c_tags solveWrap">
							<table>
								<tbody>
									<tr>
										<td width="45">地点</td>
										<td id="city">city</td>
									</tr>
									<tr>
										<td>领域</td>
										<!-- 支持多选 -->
										<td title="" id="industy">industy</td>
									</tr>
									<tr>
										<td>规模</td>
										<td id="scale">scale</td>
									</tr>
								</tbody>
							</table>
							<a id="editTags" class="c_edit" href="javascript:void(0)"></a>
						</div>
					</div>
					<!-- end #Tags -->
				</div>
			</div>
		</div>
		<!-- end #container -->
	</div>
	<!-- end #body -->
<script type="text/javascript">
$(document).ready(function(){
	getInfo();
});
function getInfo(){
	$.ajax({
		type:'POST',
    	data: {},
    	url:'${basePath}hr/getCompany',
    	dataType:'json',
    	success:function(result){
    		console.log("ajax request success");
    		var model = result.model;
    		if(model.code==0){
    			var com = model.company;
    			if(null != com.companyName){$("#name").html(com.companyName);}
    			if(null != com.welfare){$("#welfare").html(com.welfare);}
    			if(null != com.info){$("#info").html(com.info);}
    			if(null != com.city){$("#city").html(com.city);}
    			if(null != com.industy){$("#industy").html(com.industy);}
    			if(null != com.scale){$("#scale").html(com.scale);}
    		}else{
    			alert(model.msg);
        		console.log(model.msg);
    		}
    	}
	});
}

</script>
</body>
</html>